This chapter describes how to use the DHCP Server. It includes the following sections:
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that is based upon the Bootstrap Protocol (BOOTP). The DHCP server provides centrally controlled reusable IP addresses and other TCP/IP configuration information for DHCP clients. Its functionality can alleviate the burden that Network Managers have of distributing configuration information to new and existing users. This feature is compliant to RFC 2131 but supports many additional features not included in that document. There is also support for BOOTP clients as defined in RFC 951.
With DHCP, supporting clients can send broadcast DISCOVER messages to find DHCP servers in their network and subsequently be OFFERED their configuration data dynamically across the network. DHCP uses the well know BOOTP UDP ports (68 for the server and 67 for the client) to communicate requests and responses. DHCP clients and servers can use existing BOOTP relay agents to extend their service range. DHCP offers many advantages over statically configured networks, including the ability to support changing networks. Clients are only leased their IP addresses so when they no longer have a need for it or are moving to another subnet, the address can be RELEASED and made available for other clients to use.
DHCP allows clients to obtain IP network configuration information, including an IP address, from a central DHCP server. DHCP servers control whether the addresses they provide to clients are allocated permanently or are leased for a specific time period. When a client receives a leased address, it must periodically request that the server revalidate the address and renew the lease.
The processes of address allocation , leasing, and lease renewal are all handled by the DHCP client and server programs and are transparent to end-users. The clients use RFC architected messages to accept and use the options served them by the DHCP server. For example:
To DHCP clients that request options, the DHCP server typically provides options that include subnet mask, domain name server, domain name, static route, class-identifier (which indicates a particular vendor), and user class.
However a DHCP client can request its own, unique set of options. For example, Windows NT 3.5.1 DHCP clients are required to request options. The default set of client requested DHCP options provided by IBM includes subnet mask, domain name server, domain name, and static route. For option descriptions, see "DHCP Options".
The DHCP client keeps track of how much time is remaining on the lease. At a specified time prior to the expiration of the lease, usually when half of the lease time has passed, the client sends a renewal request, containing its current IP address and configuration information, to the leasing server. If the server responds with a lease offer, the DHCP client's lease is renewed.
If the DHCP server explicitly refuses the request, the DHCP client may continue to use the IP address until the lease time expires and then initiate the address request process, including broadcasting the address request. If the server is unreachable, the client may continue to use the assigned address until the lease expires.
One benefit of DHCP is the freedom it provides a client host to move from one subnet to another without having to know ahead of time what IP configuration information it needs on the new subnet. As long as the subnets to which a host relocates have access to a DHCP server, a DHCP client will automatically configure itself correctly to access those subnets.
In order for DHCP clients to reconfigure to access a new subnet, the client host must be rebooted. When a host restarts on a new subnet, the DHCP clients tries to renew its old lease with the DHCP server which originally allocated the address. The server refuses to renew the request since the address is not valid on the new subnet. Receiving no server response or instructions from the DHCP server, the client initiates the IP address request process to obtain a new IP address and access the network.
With DHCP, you can make changes at the server, reinitialize the server, and distribute the changes to all the appropriate clients. A DHCP client retains DHCP option values assigned by the DHCP server for the duration of the lease. If you implement configuration changes at the server while a client is already up and running, those changes are not processed by the DHCP client until the clients attempts to renew its lease or until it is restarted.
| Note: | If the server does not contain a Hard File or Flash Storage card and it is reinitialized (using the t 5 reset dhcp command), the lease time information displayed by the router will be lost until the DHCP clients renew their lease. |
The number of servers that you need will depend largely on the number of subnets you have, the number of DHCP clients you plan to support, whether you use BOOTP Relay, and the lease time you choose. Keep in mind that the DHCP protocol does not currently define server-to-server communication. Thus, they cannot share information, nor can one DHCP server perform as a "hot backup" in the event the other one fails. DHCP clients send broadcast messages. By design, broadcast messages do not cross subnets. To allow the client's messages to be forwarded outside its subnet, additional routers must be configured to forward DHCP requests using the BOOTP Relay agent. Otherwise, you will need to configure a DHCP server on each subnet.
If you choose to use a single DHCP server to serve hosts on a subnet, consider the effects if the single server fails. Generally, the failure of a server will affect only DHCP clients that are attempting to join the network. Typically, DHCP clients already on the network will continue operating unaffected until their lease expires. However, clients with a short lease time may lose their network access before the server can be restarted. To minimize the impact of server downtime if you have only one DHCP server for a subnet, you should choose a sufficiently long lease time to allow time to restart or respond to the failed DHCP server.
To avoid a single point of failure, you can configure two or more DHCP servers to serve the same subnet. If one server fails, the other can continue to serve the subnet. Each of the DHCP servers must be accessible either by direct attachment to the subnet or by using a BOOTP Relay agent.
Because two DHCP servers cannot serve the same addresses, address pools defined for a subnet must be unique across DHCP servers. Therefore, when using two or more DHCP servers to serve a particular subnet, the complete list of addresses for that subnet must be divided among the servers. For example, you could configure one server with an address pool consisting of 70% of the available addresses for the subnet and the other server with an address pool consisting of the remaining 30% of the available addresses.
Using multiple DHCP servers decreases the probability of having a DHCP related network access failure, but does not guarantee against it. If a DHCP server for a particular subnet fails, the other DHCP server may not be able to service all the requests from new clients which may, for example , exhaust the server's limited pool of available addresses.
However, you can bias which DHCP server exhausts it pool of addresses first. DHCP clients tend to select the DHCP server offering more options. To bias service toward the DHCP server with 70% of the available addresses, offer fewer DHCP options from the server holding 30% of the available addresses for the subnet.
If you already have BOOTP clients and servers in your network, you may want to consider replacing your BOOTP servers with DHCP servers. DHCP servers can optionally serve BOOTP clients the same IP configuration information as current BOOTP servers. If you cannot replace your BOOTP servers with DHCP servers and want to have both serve your network, the following precautions are recommended:
A DHCP server allocates a permanent IP address to a BOOTP client. In the event that subnets are renumbered in such a way that a BOOTP assigned address is unusable, the BOOTP client must restart and obtain a new IP address.
You may have DHCP clients or Network Servers which have individual or special administrative needs, such as:
You can assign permanent leases to designated hosts by specifying an infinite lease time. Also the DHCP server will allocate a permanent lease to BOOTP clients that explicitly request it as long as support for BOOTP clients is enabled. The DHCP server will also allocate a permanent lease to DHCP hosts that explicitly request it.
You can reserve a specific address and configuration parameters for a specific DHCP or BOOTP client host on a particular subnet.
You can allocate specific configuration information to a client regardless of its subnet.
You should explicitly exclude addresses from DHCP subnets for existing hosts that do not use DHCP or BOOTP for configuring their IP network access. Although DHCP servers and clients automatically check to see if an IP address is in use before allocating or using it, they will not be able to detect addresses of manually defined hosts that are turned off or temporarily off the network. In that case, duplicate address problems may occur when a manually defined host reaccesses the network, unless its IP address is explicitly excluded.
The default lease time is 24 hours. Keep in mind that the DHCP lease time can affect your network operation and performance:
The lease time you choose depends largely on your needs, including:
For complex networks that need to support a combination of host leasing requirements, you can define DHCP classes.
The following concepts are used to describe the DHCP server function:
ClassA has redefined option 1, but will inherit the value of option 3 from the global scope.
ClientA has redefined option 3, but will inherit the value of option 1 from the global scope.
It redefines the value of option 1, but will inherit the value of option 3 from SubA (which also happens to be inherited from the global scope).
ClientB has redefined option 3, but will inherit the value of option 1 from SubA.
Vendor-options are an exception. Vendor-options are independent and are not inherited outside of the vendor-option scope.
![]() |
This policy is the default. The inorder policy administers addresses starting with the subnet with the lowest priority and ending with the subnet with the highest priority.
The balance policy administers addresses from the group of defined subnets in a round-robin order. The first address is administered from the subnet with the lowest priority. The second address is administered from the subnet with the next lowest priority, and so on. When an address from the highest priority subnet has been administered, the policy returns to the subnet with the lowest priority until all addresses are exhausted from all the subnets in the group.
Each client has a specified hardware type, client id and IP address. The hardware types are defined in RFC 1340 and are shown below. For all hardware types besides 0, the client ID is the hardware address of the endstation (or MAC address). For hardware type of 0, the client id is a character string. Typically, this would be a domain name.
When defining a client, you are prompted for either an IP address, any or none. If you define an IP address, that IP address is reserved for that client. If you choose any, then that client will be given any available IP address within that subnet. If you have several subnets records defined within the same subnet, each having a unique range, then a client that is configured with any will get the first available address within the subnet, not necessarily from the range of the specific subnet record that the client is defined under. If you choose none, then that end station will not be served any IP address at all. To exclude an IP address from being administered, you would define a client record with a hardware type and client id of 0.
Hardware types that are defined by RFC1340 and that pertain to the IBM 2212 are:
Hardware Type Value ------------- ----- Reserved 0 Ethernet 1 IEEE 802 Networks (including Token Ring) 6
For the complete list, refer to RFC 1340.
The following DHCP server parameters can be defined at the global level:
See "Set" for a description of these parameters.
DHCP allows you to specify options to provide additional configuration information to a client. The options are defined in RFC 2132 and various other RFCs.
All options expect the configuration data to be in one of the following formats:
Each DHCP option is identified by a numeric code.
Architected options 0 through 127 and option 255 are reserved for definitions by RFCs. The DHCP server, the DHCP client, or both server and client use options in this set. Some architected options can be modified by the administrator. Other options are for exclusive use by the client and server.
| Note: | Hexadecimal values are not allowed for architected options with known formats. |
Options that the administrator cannot or should not configure at the DHCP server include:
Options 128 through 254 represent user-defined options that can be defined by administrators to pass information to the DHCP client to implement site-specific configuration parameters.
Additionally, IBM provides a set of IBM-specific options such as option 192: TXT RR
The format of a user-defined option is:
Syntax:
where,
The server passes the specified value to the client. However, a program or command file must be created to process the value.
The following base options are provided to the client. See "Option Formats" for a description of the configuration format.
Option format: IP addresses
Option format: Long
Option format: IP addresses
Option format: IP addresses
| Note: | This is not the Domain Name Server option. Use Option 6 to specify a Domain name server. |
Option format: IP addresses
Option format: IP addresses or un-numbered IP interfaceaddress (for example, 0.0.0.2)
| Note: | If dynamic-address is enabled in the IP configuration for a PPP interface, you may be able to retrieve a Primary and Secondary DNS address using IPCP from an Internet Service Provider (ISP). To pass these DNS addresses along to the DHCP clients, you must configure option 6 with an un-numbered IP interface address (such as 0.0.0.n) that corresponds to the Dynamic-Address interface. The DHCP server will convert this to the value retrieved from the ISP when the client sends a request. Enabling Simple-Internet-Access in the IP configuration will configure option 6 with the un-numbered IP interface automatically. Any client requesting its configuration information from this Server prior to the PPP interface activating, will be offered a shortened lease time (3 minutes) to allow time for the PPP connection and IPCP to complete. After the DNS addresses are learned, configured lease times will be offered. |
Option format: IP addresses
Option format: IP addresses
Option format: IP addresses
Option format: IP addresses
Option format: IP addresses
Option format: String
Option format: Unsigned short
Option format: String
Option format: String
Option format: IP address
Option format: String
Option format: String
Option format: Boolean
Option format: Boolean
Option format: IP address pairs
Option format: Unsigned short
Option format: Unsigned byte
Option format: Unsigned long
Option format: Unsigned short
Option format: Unsigned short
Option format: Boolean
Option format: IP address
Option format: Boolean
Option format: Boolean
Option format: Boolean
Option format: IP address
Option format: IP address pairs
Option format: Boolean
Option format: Unsigned long
Option format: Boolean
Option format: Unsigned byte
Option format: Unsigned long
Option format: Boolean
Option format: String
Option format: IP addresses
Option format: IP addresses
Servers that cannot interpret the vendor-specific information sent by a client must ignore it. Clients that do not receive desired vendor-specific information should attempt to operate without it. Refer to RFC 2131 and RFC 2132 for additional information about this option.
| Note: | Because of these considerations, IBM instead uses options 192 and 200 for IBM-specific options. |
Option format: String
Option format: IP addresses
Option format: IP addresses
Option format: Unsigned byte
Option format: Unsigned byte
Option format: IP addresses
Option format: IP addresses
Option format: N/A
Option format: Unsigned long
Option format: Unsigned long
Option format: Unsigned long
Option format: N/A
Option format: String
Option format: String
Option format: String
Option format: String
Option format: IP addresses
Option format: String
| Note: | Use this option to pass a boot file name to a DHCP client. The boot file name is required to contain the fully-qualified path name and be less than 128 characters in length. For example: option 67 c:\path\boot_file_name. This file contains information that can be interpreted in the same way as the 64-octet vendor-extension field within the BOOTP response, with the exception that the file length is limited to 128 characters by the BootP header. |
Option format: String
Option format: IP addresses
Option format: IP addresses
Option format: IP addresses
Option format: IP addresses
Option format: IP addresses
Option format: IP addresses
Option format: IP addresses
Option format: IP addresses
Option format: IP addresses
Option format: String
Option format: IP address
Option format: String
Option format: String
IBM provides a set of IBM-specific options by defining options within the user-defined range (128-254). These options are used instead of defining a vendor option (option 43) for IBM. It is recommended that you do not redefine these options.
Option format: String
The DHCP protocol provides a way to supply vendor-specific information to a DHCP client using RFC-architected options 43 and 60.
| Note: | Hex data and options are mutually exclusive in a vendor definition. You can define one or the other, but not both. |
In order for the DHCP server to successfully assign IP addresses and configuration information for clients on an added subnet, IP may have to be configured appropriately. This is necessary when the DHCP server is directly connected to a subnet that it is configured to support.
If a BOOTP relay agent is being used to forward DHCP request messages to this DHCP server, there may not be any required IP configuration to support a subnet that is not directly connected to the server.
An IP address which falls within the DHCP configured subnet will need to be added to the connecting interface.
Example:
DHCP Server config>list subnet all subnet subnet subnet starting ending name address mask IP Addr IP Addr ------------------------------------------------------------------------- net-one 192.168.8.0 255.255.255.0 192.168.8.2 192.168.8.50
IP config>add address Which net is this address for [0]? 0 New address []? 192.168.8.1 Address mask [255.255.255.0]? IP config>list add IP addresses for each interface: intf 0 192.168.8.1 255.255.255.0 Local wire broadcast, fill 1 intf 1 IP disabled on this interface intf 2 0.0.0.2 255.255.255.255 Local wire broadcast, fill 1 intf 3 IP disabled on this interface
If Simple-Internet-Access is enabled in IP and DHCP has not previously been configured, the following configuration will be automatically generated in the DHCP server. Simple-Internet-Access will also automatically configure the NAT feature and other IP filters and access controls. If DHCP is already configured there will be no changes/additions to the DHCP configuration. Refer to Using Simple Internet Access in the "Using IP" chapter in Protocol Configuration and Monitoring Reference Volume 1 for more information and restrictions.
IP config>enable simple-internet-access
Interface to Service Provider [0]? 3
SIMPLE-INTERNET-ACCESS enabled on interface 3
IP config>add address
Which net is this address for [0]? 0
New address []? 192.168.8.1
Address mask [255.255.255.0]?
IP config>list add
IP addresses for each interface:
intf 0 192.168.8.1 255.255.255.0 Local wire broadcast, fill 1
intf 1 IP disabled on this interface
intf 2 IP disabled on this interface
intf 3 0.0.0.3 255.255.255.255 Local wire broadcast, fill 1
SIMPLE-INTERNET-ACCESS Enabled
DHCP Server config> list global . . DHCP Server enabled: Yes . . DHCP Server config>list subnet all subnet subnet subnet starting ending name address mask IP Addr IP Addr ------------------------------------------------------------------------- simple-net 192.168.8.0 255.255.255.0 192.168.8.2 192.168.8.50 DHCP Server config>list option subnet Enter the subnet name []? simple-net option option code data --------------------------------------------------------------- 1 255.255.255.0 3 192.168.8.1 6 0.0.0.3
This section provides a typical DHCP server configuration in an ASCII text format. This example is strictly for the purpose of illustration, to show a configuration in a format that may be familiar to you. The IBM 2212 does not support ASCII configurations.
You can use the blocked numbers ((1)) to relate the functions described in this ASCII example to the equivalent talk 6 configuration shown in "OPCON (Talk 6) Configuration".
(1) Configuration of Server parameters
leaseTimeDefault 120 # 120 minutes
leaseExpireInterval 20 seconds
supportBOOTP yes
supportUnlistedClients yes
(2) Global options. Passed to every client unless overridden at a lower scope.
option 15 "raleigh.ibm.com" # domain name
option 6 9.67.1.5 # dns server
class manager
{
option 48 6.5.4.3
option 9 9.37.35.146
option 210 "manager_authority" # site specific option given to all managers
}
(3) Vendor-options
vendor XI-clients hex"01 02 03"
vendor XA-clients
{
option 23 100 # IP TTL
}
(4) A typical subnet
subnet 9.2.23.0 255.255.255.0 9.2.23.120-9.2.23.126
{
option 28 9.2.23.127 # broadcast address
option 9 5.6.7.8
option 51 200
(5) class manager defined at the subnet scope. Option 9 here will override
the option 9 specified in the global manager class.
class manager
{
option 9 9.2.23.98
}
(6) Programmers have their own subnet range
class developers 9.2.23.125-9.2.23.126
{
option 51 -1 # infinite lease.
option 9 9.37.35.1 # printer used by the developers
}
}
(7) Example of a client that will accept any address but will have
its own set of options.
client 6 0x10005aa4b9ab ANY
{
option 51 999
option 1 255.255.255.0
}
(8) Exclude an address from service.
client 0 0 9.2.23.121
The following is an example of the same configuration using talk 6.
(1) Configuration of Server parameters Config>f dhcp-server DHCP server user configuration DHCP Server config> enable dhcp DHCP Server config> DHCP Server config> set lease-time-default hours 2 DHCP Server config>set lease-expire-interval seconds 20 DHCP Server config>set support-bootp yes DHCP Server config>set support-unlisted-clients global yes DHCP Server config>li glob DHCP server Global Parameters ============================= DHCP server enabled: Yes Balance: No subnet groups defined Inorder: No subnet groups defined Canonical: No Lease Expire Interval: 20 second(s) Lease Time Default: 2 hour(s) Support BOOTP Clients: Yes Bootstrap Server: Not configured Support Unlisted Clients: Yes Ping Time: 1 second(s) Used IP Address Expire Interval: 15 minute(s) (2) Global options. Passed to every client unless overridden at a lower scope. DHCP Server config>add option global 15 raleigh.ibm.com DHCP Server config>add option global 6 9.67.1.5 DHCP Server config>li option global option option code data --------------------------------------------------------------- 15 raleigh.ibm.com 6 9.67.1.5
DHCP Server config>add class global Enter the class name []? manager Class record with name manager has been added DHCP Server config>add option class-global Enter the class name []? manager Enter the option code [1]? 48 Enter the option data []? 6.5.4.3 DHCP Server config>add option class-global 9 9.37.35.146 DHCP Server config>add option class-global manager 210 manager_authority DHCP Server config>li class global manager class name --------------------------------------------------------------- manager Number of Options: 3 option option code data --------------------------------------------------------------- 48 6.5.4.3 9 9.37.35.146 210 manager_authority
(3) Vendor-options DHCP Server config>add vendor-option XI-client Enter the vendor hex data []? 01 02 03 Vendor-option record with name XI-client has been added DHCP Server config> add vendor-option XA-client Enter the vendor hex data []? Vendor-option record with name XA-client has been added DHCP Server config> add option vendor-option XA-client 23 100 DHCP Server config>li vendor-option all vendor hex name data --------------------------------------------------------------- XI-client 01 02 03 XA-client DHCP Server config>li vendor-option det XA-client vendor hex name data --------------------------------------------------------------- XA-client Number of Options: 1 option option code data --------------------------------------------------------------- 23 100
(4) A typical subnet DHCP Server config>add subnet Enter the subnet name []? sub1 Enter the IP subnet []? 9.2.23.0 Enter the IP subnet mask [255.255.255.0]? Enter start of IP address range [9.2.23.1]? 9.2.23.120 Enter end of IP address range [9.2.23.150]? 9.2.23.126 Enter the subnet group name []? Subnet record with name sub1 has been added DHCP Server config> DHCP Server config> add option subnet Enter the subnet name []? sub1 Enter the option code []? 28 Enter the option data []? 9.2.23.127 DHCP Server config> add option subnet 9 5.6.7.8 DHCP Server config>add option subnet sub1 51 200 DHCP Server config>add class subnet Enter the subnet name []? sub1 Enter the class name []? manager Enter start of IP address range []? Class record with name manager has been added DHCP Server config>add option class-subnet sub1 manager Enter the option code [1]? 9 Enter the option data []? 9.2.23.98 (6) Programmers have their own subnet range DHCP Server config>add class subnet Enter the subnet name []? sub1 Enter the class name []? developers Enter start of IP address range []? 9.2.23.125 Enter end of IP address range []? 9.2.23.126 Class record with name developers has been added DHCP Server config>add option class-subnet sub1 developers 51 -1 DHCP Server config>add option class-subnet sub1 developers 9 9.37.35.1
DHCP Server config>li subnet detailed sub1
subnet subnet subnet starting ending
name address mask IP Addr IP Addr
-------------------------------------------------------------------------
sub1 9.2.23.0 255.255.255.0 9.2.23.120 9.2.23.126
Number of Classes: 2
class
name
---------------------------------------------------------------
manager
Number of Options: 1
option option
code data
---------------------------------------------------------------
9 9.2.23.98
developers
starting IP address: 9.2.23.125
ending IP address: 9.2.23.126
Number of Options: 2
option option
code data
---------------------------------------------------------------
51 -1
9 9.37.35.1
Number of Options: 3
option option
code data
---------------------------------------------------------------
28 9.2.23.127
9 5.6.7.8
51 200
(7) Example of a client that will accept any address but will have its own set of options.
DHCP Server config>add client global
Enter the client name []? any-addr
Enter the client's hardware type (0 - 21) [1]? 6
Enter the client ID (MAC address or string) []? 10005aa4b9ab
Enter the client's IP address (IP address, any, none) []? any
DHCP Server config>add option client-global any-addr 51 999
DHCP Server config>add option client-global any-addr 1 255.255.255.0
(8) Exclude an address from service.
Enter the client name []? excl-addr
Enter the client's hardware type (0 - 21) [1]? 0
Enter the client ID (MAC address or string) []? 0
Enter the client's IP address (IP address, any, none) []? 9.2.23.121
DHCP Server config>li cli all
client client client attached IP
name type identifier to subnet address
------------------------------------------------------------------------------
any-addr 6 10005aa4b9ab Any
excl-addr 0 0 9.2.23.121
DHCP Server config>li client global any-addr
client client client IP
name type identifier address
--------------------------------------------------------------------
any-addr 6 10005aa4b9ab Any
Number of Options: 2
option option
code data
---------------------------------------------------------------
51 999
1 255.255.255.0